package net.pws.oos.biz.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "b_photo_marker")
public class PhotoMarker extends Identifier {

	private static final long serialVersionUID = -8385341712325566506L;

	public static final int RECT = 0;
	public static final int OVAL = 1;

	@Column(name = "media_id")
	private String mediaId;

	@Column(name = "create_date")
	private Date createDate;

	private int type = RECT;

	@Column(name = "left_p")
	private float left;

	@Column(name = "top_p")
	private float top;

	@Column(name = "right_p")
	private float right;

	@Column(name = "bottom_p")
	private float bottom;

	public String getMediaId() {
		return mediaId;
	}

	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public float getLeft() {
		return left;
	}

	public void setLeft(float left) {
		this.left = left;
	}

	public float getTop() {
		return top;
	}

	public void setTop(float top) {
		this.top = top;
	}

	public float getRight() {
		return right;
	}

	public void setRight(float right) {
		this.right = right;
	}

	public float getBottom() {
		return bottom;
	}

	public void setBottom(float bottom) {
		this.bottom = bottom;
	}

	public float getWidth() {
		return right - left;
	}

	public float getHeight() {
		return bottom - top;
	}
}
